import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SPublicMiniPlayer } from "./SPublicMiniPlayer";
import { SPlayerItem } from "./SPlayerItem";
type int = number;
//class SStallLeaveWord
    
    export  class SStallLeaveWord extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SStallLeaveWord();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeDate(this.leaveWordDt);
            this.player.__write(arg1);
            arg1.writeInt(this.type);
            arg1.writeInt(this.gold);
            arg1.writeInt(this.coin);
            arg1.writeInt(this.amount);
            this.playerItem.__write(arg1);
            arg1.writeString(this.msg);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.leaveWordDt = arg1.readDate();
            this.player = new SPublicMiniPlayer();
            this.player.__read(arg1);
            this.type = arg1.readInt();
            this.gold = arg1.readInt();
            this.coin = arg1.readInt();
            this.amount = arg1.readInt();
            this.playerItem = new SPlayerItem();
            this.playerItem.__read(arg1);
            this.msg = arg1.readString();
            return;
        }

        public /* const */_type: int=20304;

        public /* var */leaveWordDt: Date;

        public /* var */player: SPublicMiniPlayer;

        public /* var */type: int;

        public /* var */gold: int;

        public /* var */coin: int;

        public /* var */amount: int;

        public /* var */playerItem: SPlayerItem;

        public /* var */msg: string;

        public static /* var */_regist: SStallLeaveWord;
    }

            SStallLeaveWord._regist = new SStallLeaveWord(true);
        